/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 01-dic-2011, 17:47:02
 */
package formularios;
import clases.ProcesarTxt;
import clases.panelfondo;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.ImageIcon;


/**
 *
 * @author Elio
 */
public class Principal extends javax.swing.JFrame {
    

    /** Creates new form Principal */
    public Principal() {
        initComponents();
    Dimension d=Toolkit.getDefaultToolkit().getScreenSize();
     this.setSize((int) d.getWidth() , (int) d.getHeight());
    this.getContentPane().setLayout(new BorderLayout()); 
    this.getContentPane().add(jTabbedPane1, BorderLayout.NORTH);
    
    }
    public void init(){
    
    panelfondo pd=new panelfondo();
    add(pd);
    }
    
    

    
    
    
    
    
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ReIdentificacion = new javax.swing.JDialog();
        jPanel3 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        cbTipoReIdentificacion = new javax.swing.JComboBox();
        btnAceptarRe = new javax.swing.JButton();
        NumeroIdentificacion = new javax.swing.JDialog();
        jLabel2 = new javax.swing.JLabel();
        tfIdentificacion = new javax.swing.JTextField();
        btnBuscarIdentificacion = new javax.swing.JButton();
        btnAtras = new javax.swing.JButton();
        NuevoSenasa = new javax.swing.JDialog();
        jLabel3 = new javax.swing.JLabel();
        tfNumSenasa = new javax.swing.JTextField();
        btnGuardar = new javax.swing.JButton();
        btnCancelar = new javax.swing.JButton();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        panelMenu = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        TabAnimales = new javax.swing.JPanel();
        btnAnimales = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        btnImportarDatos1 = new javax.swing.JButton();
        TabEventos = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        TabGestion = new javax.swing.JPanel();
        btnVentaAnimales = new javax.swing.JButton();
        btnProveedores = new javax.swing.JButton();
        btnClientes = new javax.swing.JButton();
        TabEstadisticas = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        mGestion = new javax.swing.JMenu();
        ItemAnimal = new javax.swing.JMenu();
        itemExistentes = new javax.swing.JMenuItem();
        itemFichaAnimal = new javax.swing.JMenuItem();
        itemBajaAnimal = new javax.swing.JMenuItem();
        miEquivalencias = new javax.swing.JMenuItem();
        miControl = new javax.swing.JMenuItem();
        miEstadisticas = new javax.swing.JMenuItem();
        miProveedor = new javax.swing.JMenuItem();
        miCliente = new javax.swing.JMenuItem();

        ReIdentificacion.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        ReIdentificacion.setTitle("Re identificacion");
        ReIdentificacion.getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel3.setLayout(new java.awt.GridLayout(3, 0, 5, 8));

        jLabel1.setText("Seleccione la re identificación que desea hacer");
        jPanel3.add(jLabel1);

        cbTipoReIdentificacion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Caravana Senasa", "Caravana Electrónica" }));
        jPanel3.add(cbTipoReIdentificacion);

        btnAceptarRe.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/oks.png"))); // NOI18N
        btnAceptarRe.setText("Aceptar");
        jPanel3.add(btnAceptarRe);

        ReIdentificacion.getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, -1, -1));

        NumeroIdentificacion.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        NumeroIdentificacion.setTitle("Número de identificación del animal");

        jLabel2.setText("Ingresar el número de identificación del animal");

        tfIdentificacion.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));

        btnBuscarIdentificacion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/buscar.png"))); // NOI18N
        btnBuscarIdentificacion.setText("Buscar");

        btnAtras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/restaurar.png"))); // NOI18N
        btnAtras.setText("VolverAtras");

        javax.swing.GroupLayout NumeroIdentificacionLayout = new javax.swing.GroupLayout(NumeroIdentificacion.getContentPane());
        NumeroIdentificacion.getContentPane().setLayout(NumeroIdentificacionLayout);
        NumeroIdentificacionLayout.setHorizontalGroup(
            NumeroIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NumeroIdentificacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(NumeroIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(NumeroIdentificacionLayout.createSequentialGroup()
                        .addComponent(btnAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnBuscarIdentificacion))
                    .addGroup(NumeroIdentificacionLayout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addGap(18, 18, 18)
                        .addComponent(tfIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(37, 37, 37))
        );
        NumeroIdentificacionLayout.setVerticalGroup(
            NumeroIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NumeroIdentificacionLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(NumeroIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tfIdentificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(NumeroIdentificacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnBuscarIdentificacion)
                    .addComponent(btnAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(206, Short.MAX_VALUE))
        );

        NuevoSenasa.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        NuevoSenasa.setTitle("Agregar numero de senasa");

        jLabel3.setText("Número de senasa");

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/filesave.png"))); // NOI18N
        btnGuardar.setText("Guardar");

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/cerra.png"))); // NOI18N
        btnCancelar.setText("Cancelar");

        javax.swing.GroupLayout NuevoSenasaLayout = new javax.swing.GroupLayout(NuevoSenasa.getContentPane());
        NuevoSenasa.getContentPane().setLayout(NuevoSenasaLayout);
        NuevoSenasaLayout.setHorizontalGroup(
            NuevoSenasaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NuevoSenasaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(NuevoSenasaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, NuevoSenasaLayout.createSequentialGroup()
                        .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(29, 29, 29)
                        .addComponent(tfNumSenasa, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
                    .addGroup(NuevoSenasaLayout.createSequentialGroup()
                        .addComponent(btnCancelar)
                        .addGap(18, 18, 18)
                        .addComponent(btnGuardar)))
                .addContainerGap(170, Short.MAX_VALUE))
        );
        NuevoSenasaLayout.setVerticalGroup(
            NuevoSenasaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(NuevoSenasaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(NuevoSenasaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfNumSenasa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(NuevoSenasaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnGuardar)
                    .addComponent(btnCancelar))
                .addContainerGap(218, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("YERRA Soft : Gestion de ganado");
        setIconImage(getIconImage());
        setIconImages(getIconImages());
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLayeredPane1.setPreferredSize(getPreferredSize());

        panelMenu.setOpaque(false);
        panelMenu.setPreferredSize(preferredSize());
        panelMenu.setLayout(new javax.swing.BoxLayout(panelMenu, javax.swing.BoxLayout.PAGE_AXIS));

        jTabbedPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        jTabbedPane1.setFont(new java.awt.Font("Tahoma", 0, 18));

        TabAnimales.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        TabAnimales.setFont(new java.awt.Font("Tahoma", 0, 18));
        TabAnimales.setLayout(new java.awt.GridLayout(1, 0));

        btnAnimales.setFont(new java.awt.Font("Arial", 1, 16));
        btnAnimales.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/vaca2.png"))); // NOI18N
        btnAnimales.setText("Animales Existentes");
        btnAnimales.setToolTipText("Ver Ficha de Animal - Animales Existentes");
        btnAnimales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAnimalesActionPerformed(evt);
            }
        });
        TabAnimales.add(btnAnimales);

        jButton9.setFont(new java.awt.Font("Arial", 1, 16));
        jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/stock.png"))); // NOI18N
        jButton9.setText("Control Stock");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });
        TabAnimales.add(jButton9);

        jButton1.setFont(new java.awt.Font("Arial", 1, 16));
        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/equivalencia2.png"))); // NOI18N
        jButton1.setText("Leer Equivalencias");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        TabAnimales.add(jButton1);

        btnImportarDatos1.setFont(new java.awt.Font("Arial", 1, 16));
        btnImportarDatos1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/GesReaderIco.png"))); // NOI18N
        btnImportarDatos1.setText("Cargar identificaciones");
        btnImportarDatos1.setToolTipText("Importa el archivo generado por el lector GesReader");
        btnImportarDatos1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImportarDatos1ActionPerformed(evt);
            }
        });
        TabAnimales.add(btnImportarDatos1);

        jTabbedPane1.addTab("ANIMALES", new javax.swing.ImageIcon(getClass().getResource("/iconos/vaca.png")), TabAnimales); // NOI18N

        TabEventos.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        TabEventos.setLayout(new java.awt.GridLayout(1, 0));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "CRIA", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Arial", 0, 14))); // NOI18N
        jPanel1.setLayout(new java.awt.GridLayout(1, 0));

        jButton3.setFont(new java.awt.Font("Arial", 1, 16));
        jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/preñez.png"))); // NOI18N
        jButton3.setText("Tacto");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton3);

        jButton4.setFont(new java.awt.Font("Arial", 1, 16));
        jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/paricion.png"))); // NOI18N
        jButton4.setText("Parición");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton4);

        jButton2.setFont(new java.awt.Font("Arial", 1, 16));
        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/destete.png"))); // NOI18N
        jButton2.setText("Destete");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel1.add(jButton2);

        TabEventos.add(jPanel1);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "SANIDAD", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Arial", 0, 14))); // NOI18N
        jPanel2.setLayout(new java.awt.GridLayout(1, 0));

        jButton5.setFont(new java.awt.Font("Arial", 1, 16));
        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/jeringa.png"))); // NOI18N
        jButton5.setText("Vacunación");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        jPanel2.add(jButton5);

        jButton6.setFont(new java.awt.Font("Arial", 1, 16));
        jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/cruz-roja-japon.png"))); // NOI18N
        jButton6.setText("Enfermedad");
        jPanel2.add(jButton6);

        jButton7.setFont(new java.awt.Font("Arial", 1, 16));
        jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/balanza.jpg"))); // NOI18N
        jButton7.setText("Peso");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });
        jPanel2.add(jButton7);

        TabEventos.add(jPanel2);

        jTabbedPane1.addTab("EVENTOS", new javax.swing.ImageIcon(getClass().getResource("/iconos/Evento.png")), TabEventos); // NOI18N

        TabGestion.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        TabGestion.setLayout(new java.awt.GridLayout(1, 0));

        btnVentaAnimales.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        btnVentaAnimales.setIcon(new javax.swing.ImageIcon("C:\\Users\\Ele\\Documents\\NetBeansProjects\\trunk\\COLISA\\src\\iconos\\dinero.png")); // NOI18N
        btnVentaAnimales.setText("Control Ventas de Animales");
        btnVentaAnimales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVentaAnimalesActionPerformed(evt);
            }
        });
        TabGestion.add(btnVentaAnimales);

        btnProveedores.setFont(new java.awt.Font("Arial", 1, 16));
        btnProveedores.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/rolesvarios1.png"))); // NOI18N
        btnProveedores.setText("Proveedores");
        btnProveedores.setToolTipText("Gestión de proveedores");
        btnProveedores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProveedoresActionPerformed(evt);
            }
        });
        TabGestion.add(btnProveedores);

        btnClientes.setFont(new java.awt.Font("Arial", 1, 16));
        btnClientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/roles2.png"))); // NOI18N
        btnClientes.setText("Clientes");
        btnClientes.setToolTipText("Hacer click para ver el módulo de Clientes");
        btnClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnClientesActionPerformed(evt);
            }
        });
        TabGestion.add(btnClientes);

        jTabbedPane1.addTab("GESTIÓN", new javax.swing.ImageIcon(getClass().getResource("/iconos/gestion.png")), TabGestion); // NOI18N

        TabEstadisticas.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        TabEstadisticas.setLayout(new java.awt.GridLayout(1, 0));

        jButton8.setFont(new java.awt.Font("Tahoma", 1, 12));
        jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/buscar.png"))); // NOI18N
        jButton8.setText("ABRIR MODULO ESTADISTICAS");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });
        TabEstadisticas.add(jButton8);

        jTabbedPane1.addTab("ESTADISTICAS", new javax.swing.ImageIcon(getClass().getResource("/iconos/estadistica.png")), TabEstadisticas); // NOI18N

        panelMenu.add(jTabbedPane1);

        panelMenu.setBounds(0, 0, 660, 90);
        jLayeredPane1.add(panelMenu, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(jLayeredPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 657, 500));

        mGestion.setText("Herramientas");

        ItemAnimal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/vaca.png"))); // NOI18N
        ItemAnimal.setText("Animales");

        itemExistentes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/buscar.png"))); // NOI18N
        itemExistentes.setText("Animales existentes");
        itemExistentes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemExistentesActionPerformed(evt);
            }
        });
        ItemAnimal.add(itemExistentes);

        itemFichaAnimal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/existentes.png"))); // NOI18N
        itemFichaAnimal.setText("Ficha animal");
        itemFichaAnimal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemFichaAnimalActionPerformed(evt);
            }
        });
        ItemAnimal.add(itemFichaAnimal);

        itemBajaAnimal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/baja.png"))); // NOI18N
        itemBajaAnimal.setText("Baja Animal");
        itemBajaAnimal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                itemBajaAnimalActionPerformed(evt);
            }
        });
        ItemAnimal.add(itemBajaAnimal);

        mGestion.add(ItemAnimal);

        miEquivalencias.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/equivalencia.png"))); // NOI18N
        miEquivalencias.setText("Leer Equivalencias");
        miEquivalencias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miEquivalenciasActionPerformed(evt);
            }
        });
        mGestion.add(miEquivalencias);

        miControl.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/GesReaderIcoMI.png"))); // NOI18N
        miControl.setText("Leer Control");
        miControl.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miControlActionPerformed(evt);
            }
        });
        mGestion.add(miControl);

        miEstadisticas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/estadistica.png"))); // NOI18N
        miEstadisticas.setText("Estadisticas");
        mGestion.add(miEstadisticas);

        miProveedor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/rolesvarios.png"))); // NOI18N
        miProveedor.setText("Proveedores");
        miProveedor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miProveedorActionPerformed(evt);
            }
        });
        mGestion.add(miProveedor);

        miCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/iconos/roles.png"))); // NOI18N
        miCliente.setText("Clientes");
        miCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miClienteActionPerformed(evt);
            }
        });
        mGestion.add(miCliente);

        jMenuBar1.add(mGestion);

        setJMenuBar(jMenuBar1);
    }// </editor-fold>//GEN-END:initComponents

    
    
private void btnProveedoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProveedoresActionPerformed
    new Proveedores().setVisible(true);
}//GEN-LAST:event_btnProveedoresActionPerformed

private void btnAnimalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAnimalesActionPerformed
        
    new AnimalesExistentes().setVisible(true);
    
}//GEN-LAST:event_btnAnimalesActionPerformed

private void btnImportarDatos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportarDatos1ActionPerformed
          ProcesarTxt a = new ProcesarTxt();
             a.leerControl();
            

}//GEN-LAST:event_btnImportarDatos1ActionPerformed

private void miControlActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miControlActionPerformed

       ProcesarTxt a = new ProcesarTxt();
             a.leerControl();
    
}//GEN-LAST:event_miControlActionPerformed

private void miEquivalenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miEquivalenciasActionPerformed
          ProcesarTxt a = new ProcesarTxt();
             a.leerGrafico();
}//GEN-LAST:event_miEquivalenciasActionPerformed

    private void btnClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnClientesActionPerformed
        new Clientes(this,true).setVisible(true);
    }//GEN-LAST:event_btnClientesActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
   ProcesarTxt a = new ProcesarTxt();
         a.leerGrafico();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void miProveedorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miProveedorActionPerformed
        new Proveedores().setVisible(true);
    }//GEN-LAST:event_miProveedorActionPerformed

    private void miClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miClienteActionPerformed
     new Clientes(this,true).setVisible(true); 
    }//GEN-LAST:event_miClienteActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed

    new ControlPrenez(this, false).setVisible(true);
    
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed

    new ControlParicion(this, false).setVisible(true);
    
}//GEN-LAST:event_jButton4ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
    
    new ControlDestete(this, true).setVisible(true);
    
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed

    new Vacunaciones(this, false).setVisible(true);
    
}//GEN-LAST:event_jButton5ActionPerformed

    private void itemBajaAnimalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemBajaAnimalActionPerformed
      new BajaBovino(this,true).setVisible(true);
      
    }//GEN-LAST:event_itemBajaAnimalActionPerformed

    private void itemExistentesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemExistentesActionPerformed
            new AnimalesExistentes().setVisible(true);
    }//GEN-LAST:event_itemExistentesActionPerformed

    private void itemFichaAnimalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_itemFichaAnimalActionPerformed
          new FichaAnimal().setVisible(true);
    }//GEN-LAST:event_itemFichaAnimalActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
         new Estadisticas(this,true).setVisible(true);
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        new ControlPeso(this,true).setVisible(true);
    }//GEN-LAST:event_jButton7ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
         new  ControlStock(this,true).setVisible(true);
    }//GEN-LAST:event_jButton9ActionPerformed

private void btnVentaAnimalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVentaAnimalesActionPerformed

    new ControlVentas(this,true).setVisible(true);
    
}//GEN-LAST:event_btnVentaAnimalesActionPerformed

    
    @Override
     public Image getIconImage() {
        Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("iconos/iconoCOLISA.png"));


        return retValue;
    }
    
    public Image getIconImageAnimales() {
        Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("iconos/vaca.png"));


        return retValue;
    }
    
    
    public Image getIconImageEstadisticas() {
        Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("iconos/estadistica.png"));


        return retValue;
    }
    
    public Image getIconImageEventos() {
        Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("iconos/evento.gif"));


        return retValue;
    }
    
    public Image getIconImageGestion() {
        Image retValue = Toolkit.getDefaultToolkit().
                getImage(ClassLoader.getSystemResource("iconos/gestion.png"));


        return retValue;
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            
            public void run() {
                new Principal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu ItemAnimal;
    private javax.swing.JDialog NuevoSenasa;
    private javax.swing.JDialog NumeroIdentificacion;
    private javax.swing.JDialog ReIdentificacion;
    private javax.swing.JPanel TabAnimales;
    private javax.swing.JPanel TabEstadisticas;
    private javax.swing.JPanel TabEventos;
    private javax.swing.JPanel TabGestion;
    private javax.swing.JButton btnAceptarRe;
    private javax.swing.JButton btnAnimales;
    private javax.swing.JButton btnAtras;
    private javax.swing.JButton btnBuscarIdentificacion;
    private javax.swing.JButton btnCancelar;
    private javax.swing.JButton btnClientes;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnImportarDatos1;
    private javax.swing.JButton btnProveedores;
    private javax.swing.JButton btnVentaAnimales;
    private javax.swing.JComboBox cbTipoReIdentificacion;
    private javax.swing.JMenuItem itemBajaAnimal;
    private javax.swing.JMenuItem itemExistentes;
    private javax.swing.JMenuItem itemFichaAnimal;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JMenu mGestion;
    private javax.swing.JMenuItem miCliente;
    private javax.swing.JMenuItem miControl;
    private javax.swing.JMenuItem miEquivalencias;
    private javax.swing.JMenuItem miEstadisticas;
    private javax.swing.JMenuItem miProveedor;
    private javax.swing.JPanel panelMenu;
    private javax.swing.JTextField tfIdentificacion;
    private javax.swing.JTextField tfNumSenasa;
    // End of variables declaration//GEN-END:variables
}
